<?php
// +----------------------------------------------------------------------
// | LIKE [ JUST DO IT ]
// +----------------------------------------------------------------------
// | Author: Mr.hu <huhaiyang7788@163.com>
// +----------------------------------------------------------------------
// | DESC: Api基类
// +----------------------------------------------------------------------


namespace api\controllers;




use common\controllers\CommonApi;

class BaseController extends CommonApi
{
    //token的使用方式
    protected $validate_token_type='mysql';

    //关于token验证的配置
    protected $validate_token_config=[
        'table_name'=>'',
        'token_filed_name'=>'',
        'active_field_name'=>''
    ];

    /**
     * 验证token的有效性
     * return void
     * @ Mr.hu.
     */
    public function validateToken($token)
    {
        return parent::$tokenService->validateToken($token);
    }

}